

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=&#34;auto&#34;>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/favicon.png">
  <link rel="icon" type="image/png" href="/img/favicon.png">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="">
  <meta name="author" content="John Doe">
  <meta name="keywords" content="">
  <title>Git - Hexo</title>

  <link  rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.staticfile.org/github-markdown-css/4.0.0/github-markdown.min.css" />
  <link  rel="stylesheet" href="/lib/hint/hint.min.css" />

  
    
    
      
      <link  rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/10.0.0/styles/github-gist.min.css" />
    
  

  


<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_pf9vaxs7x7b.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_kmeydafke9r.css">


<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 5.2.0"></head>


<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand"
       href="/">&nbsp;<strong>Zchaos</strong>&nbsp;</a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" data-toggle="modal" data-target="#modalSearch">&nbsp;<i
                class="iconfont icon-search"></i>&nbsp;</a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" href="javascript:">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner intro-2" id="background" parallax=true
         style="background: url('/img/post.jpg') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="container page-header text-center fade-in-up">
            <span class="h2" id="subtitle">
              
            </span>

            
              <div class="mt-3">
  
  
    <span class="post-meta">
      <i class="iconfont icon-date-fill" aria-hidden="true"></i>
      <time datetime="2020-10-05 15:46" pubdate>
        2020年10月5日 下午
      </time>
    </span>
  
</div>

<div class="mt-1">
  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      994 字
    </span>
  

  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      12
       分钟
    </span>
  

  
  
</div>

            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid">
  <div class="row">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-md">
      <div class="container nopadding-md" id="board-ctn">
        <div class="py-5" id="board">
          <article class="post-content mx-auto" id="post">
            <!-- SEO header -->
            <h1 style="display: none">Git</h1>
            
            <div class="markdown-body" id="post-body">
              <h1 id="Git"><a href="#Git" class="headerlink" title="Git"></a>Git</h1><p><img src="https://i.loli.net/2020/10/03/t5HXQqvL7BepOES.png" srcset="/img/loading.gif" alt="v2-dad7a6694ad6026308d580ada34703f5_720w"></p>
<h2 id="基本配置"><a href="#基本配置" class="headerlink" title="基本配置"></a>基本配置</h2><h3 id="账户信息配置"><a href="#账户信息配置" class="headerlink" title="账户信息配置"></a>账户信息配置</h3><pre><code class="hljs css"><span class="hljs-comment">/*保存在用户目录的.gitconfig文件下*/</span>
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">config</span> <span class="hljs-selector-tag">--global</span> <span class="hljs-selector-tag">user</span><span class="hljs-selector-class">.name</span> <span class="hljs-selector-tag">xxx</span> 				#设置用户名
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">config</span> <span class="hljs-selector-tag">--global</span> <span class="hljs-selector-tag">user</span><span class="hljs-selector-class">.email</span> <span class="hljs-selector-tag">yyy</span>				#设置邮箱
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">config</span> <span class="hljs-selector-tag">--global</span> <span class="hljs-selector-tag">push</span><span class="hljs-selector-class">.default</span> <span class="hljs-selector-tag">simple</span> 		<span class="hljs-selector-id">#git</span> <span class="hljs-selector-tag">push</span>默认提交格式
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">config</span> <span class="hljs-selector-tag">--global</span> <span class="hljs-selector-tag">core</span><span class="hljs-selector-class">.quotepath</span> <span class="hljs-selector-tag">false</span>		#防止文件名变成数字
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">config</span> <span class="hljs-selector-tag">--global</span> <span class="hljs-selector-tag">core</span><span class="hljs-selector-class">.editor</span> &quot;<span class="hljs-selector-tag">code</span> <span class="hljs-selector-tag">--wait</span>&quot; 	#使用<span class="hljs-selector-tag">vscode</span>编辑提交信息
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">config</span> <span class="hljs-selector-tag">--global</span> <span class="hljs-selector-tag">core</span><span class="hljs-selector-class">.autocrlf</span> <span class="hljs-selector-tag">input</span> 		#提交到<span class="hljs-selector-tag">git</span>是自动将换行符转换为<span class="hljs-selector-tag">lf</span></code></pre>



<h3 id="密钥配置"><a href="#密钥配置" class="headerlink" title="密钥配置"></a>密钥配置</h3><pre><code class="hljs css"><span class="hljs-comment">/*生成公钥后，请把id_rsa.pub文件的内容拷贝到github的Settings*/</span>
<span class="hljs-selector-tag">ssh-keygen</span> <span class="hljs-selector-tag">-t</span> <span class="hljs-selector-tag">rsa</span> <span class="hljs-selector-tag">-b</span> 4096 <span class="hljs-selector-tag">-C</span> &quot;<span class="hljs-selector-tag">your_email</span><span class="hljs-keyword">@example</span>.com&quot; #生成密钥
ssh -T git@github.com 								  #测试是否成功</code></pre>



<h3 id="别名配置"><a href="#别名配置" class="headerlink" title="别名配置"></a>别名配置</h3><h4 id="方法一"><a href="#方法一" class="headerlink" title="方法一"></a>方法一</h4><pre><code class="hljs css"><span class="hljs-comment">/*在.gitconfig设置别名*/</span>
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">config</span> <span class="hljs-selector-tag">--global</span> <span class="hljs-selector-tag">alias</span><span class="hljs-selector-class">.st</span> <span class="hljs-selector-tag">status</span> <span class="hljs-selector-id">#git</span> <span class="hljs-selector-tag">st</span>
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">config</span> <span class="hljs-selector-tag">--global</span> <span class="hljs-selector-tag">alias</span><span class="hljs-selector-class">.co</span> <span class="hljs-selector-tag">checkout</span> <span class="hljs-selector-id">#git</span> <span class="hljs-selector-tag">co</span></code></pre>

<h4 id="方法二"><a href="#方法二" class="headerlink" title="方法二"></a>方法二</h4><pre><code class="hljs css"><span class="hljs-comment">/*在.bashrc设置别名*/</span>
alias ga=&quot; git add&quot;
alias gc=&quot; git commit v&quot;</code></pre>



<h3 id="特殊文件配置"><a href="#特殊文件配置" class="headerlink" title="特殊文件配置"></a>特殊文件配置</h3><pre><code>    将文件名写入`.gitignore`，系统会忽略里面的文件</code></pre>
<h2 id="本地仓库"><a href="#本地仓库" class="headerlink" title="本地仓库"></a>本地仓库</h2><pre><code class="hljs css"><span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">init</span>             				#初始化本地仓库
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">add</span> .             				#将修改的和新文件提交到暂存区，不包括被删除的文件
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">commit</span> <span class="hljs-selector-tag">-v</span>         				#提交到本地仓库时显示<span class="hljs-selector-tag">diff</span>的信息
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">status</span> <span class="hljs-selector-tag">-sb</span>        				#以短形式显示修改文件清单，但显示分支名称
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">diff</span>			  				#显示工作区和暂存区的差异
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">log</span>               				#显示提交记录
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">reflog</span>            				#显示历史提交记录
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">reset</span> <span class="hljs-selector-tag">--hard</span> <span class="hljs-selector-attr">[commentid]</span>        #版本回滚，重置相应的工作区，暂存区以及<span class="hljs-selector-tag">HEAD</span>
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">rebase</span> <span class="hljs-selector-tag">-i</span>                       #提交信息的增删查改
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">commit</span> <span class="hljs-selector-tag">--amend</span>					#修改最近一次的提交信息</code></pre>

<pre><code class="hljs css"><span class="hljs-comment">/*主要是用于工作区还原，建议使用git restore*/</span>
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">checkout</span> <span class="hljs-selector-tag">--</span> &lt;<span class="hljs-selector-tag">file</span>&gt;              #还原已在工作区更改的文件
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">reset</span> <span class="hljs-selector-tag">HEAD</span> <span class="hljs-selector-tag">--</span> &lt;<span class="hljs-selector-tag">file</span>&gt;            #删除已注册到暂存区的文件</code></pre>

<p><strong>ps:</strong>    </p>
<ol>
<li>HEAD指向的是现在使用中的分支的最后一次更新。提交时使用~(tilde)和^(caret)就可以指定某个提交的相对位置。</li>
<li><code>git reset</code>和<code>git revert</code>的区别 简而言之<code>reset</code>会删除之前的commit，HEAD会向后退。<code>revert</code>用新的commit来回滚之前的commit，HEAD是向前进的。所以前者<code>push</code>需要<code>git push -f</code></li>
</ol>
<h2 id="分支处理"><a href="#分支处理" class="headerlink" title="分支处理"></a>分支处理</h2><pre><code class="hljs css"><span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">branch</span>           				 #显示本地分支
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">branch</span> <span class="hljs-selector-tag">-d</span> &lt;<span class="hljs-selector-tag">branchname</span>&gt;			 #删除分支
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">branch</span> <span class="hljs-selector-tag">-D</span> &lt;<span class="hljs-selector-tag">branchname</span>&gt;           #强制删除分支
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">checkout</span> &lt;<span class="hljs-selector-tag">branchname</span>&gt;            #切换分支
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">checkout</span> <span class="hljs-selector-tag">-b</span> &lt;<span class="hljs-selector-tag">branchname</span>&gt;         #创建并切换分支
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">merge</span> &lt;<span class="hljs-selector-tag">branchname</span>&gt;               #将指定分支合并到当前分支
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">stash</span>                            #将工作环境封存
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">stash</span> <span class="hljs-selector-tag">pop</span>                        #恢复工作环境，并将<span class="hljs-selector-tag">stash</span>内容删除</code></pre>

<pre><code class="hljs css"><span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">cherry-pick</span> &lt;<span class="hljs-selector-tag">commitid</span>&gt;           #选择某个分支的提交导入到现有分支
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">merge</span> <span class="hljs-selector-tag">--squash</span> &lt;<span class="hljs-selector-tag">branchname</span>&gt;		 #将所选分支的的所有提交合并成一个提交，并导入当前分支
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">rebase</span> &lt;<span class="hljs-selector-tag">commitid</span>&gt;				 #使用变基的方式合并
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">rebase</span> <span class="hljs-selector-tag">--continue</span>				 #继续变基
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">rebase</span> <span class="hljs-selector-tag">--abort</span>					 #中止变基</code></pre>

<p><strong>ps:</strong>    git默认的合并方式是fast-forward合并，若想合并后还能生成新的提交请使用<code>git merge --no-ff </code></p>
<h2 id="远程仓库"><a href="#远程仓库" class="headerlink" title="远程仓库"></a>远程仓库</h2><pre><code class="hljs css"><span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">remote</span> <span class="hljs-selector-tag">add</span> &lt;<span class="hljs-selector-tag">shortname</span>&gt; &lt;<span class="hljs-selector-tag">url</span>&gt;     #添加一个远程仓库，并指定相应的简写
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">push</span> <span class="hljs-selector-tag">-u</span> &lt;<span class="hljs-selector-tag">remote</span>&gt; &lt;<span class="hljs-selector-tag">branch</span>&gt;		 #设置<span class="hljs-selector-tag">upsteam</span>,将本地仓库上传到远程仓库
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">push</span> 							 #将本地仓库上传到远程仓库（设置好<span class="hljs-selector-tag">upsteam</span>才可简写）
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">pull</span>                             #将远程仓库同本地分支合并（<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">fetch</span>+<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">merge</span>）
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">fetch</span>							 #将远程仓库下载到本地仓库
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">clone</span> &lt;<span class="hljs-selector-tag">url</span>&gt;                      #克隆远程仓库，并创建同名文件夹</code></pre>

<h2 id="标签"><a href="#标签" class="headerlink" title="标签"></a>标签</h2><pre><code class="hljs css"><span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">tag</span>								#查看标签列表		
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">tag</span> &lt;<span class="hljs-selector-tag">tagname</span>&gt;					#添加标签
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">tag</span> <span class="hljs-selector-tag">-a</span> &lt;<span class="hljs-selector-tag">tagname</span>&gt;				#添加标签注释	
<span class="hljs-selector-tag">git</span> <span class="hljs-selector-tag">tag</span> <span class="hljs-selector-tag">-d</span> &lt;<span class="hljs-selector-tag">tagname</span>&gt;				#删除标签</code></pre>

<p><strong>后话：</strong>git版本2.28以上，使用<code>git restore</code>代替<code>git checkout</code>的文件恢复功能，使用<code>git switch</code>代替``git checkout`的分支处理功能，可以参考<a target="_blank" rel="noopener" href="https://yanhaijing.com/git/2020/09/17/git-switch-and-restore/">Git新命令switch和restore</a></p>
<hr>
<p><strong>参考资料：</strong></p>
<ol>
<li><a target="_blank" rel="noopener" href="https://backlog.com/git-tutorial/cn/stepup/stepup1_1.html">猴子都懂的git入门</a></li>
<li><a target="_blank" rel="noopener" href="https://www.liaoxuefeng.com/wiki/896043488029600">廖雪峰的git教程</a></li>
</ol>
<p><strong>推荐资料:</strong></p>
<ol>
<li><a target="_blank" rel="noopener" href="http://marklodato.github.io/visual-git-guide/index-zh-cn.html">图解git</a></li>
<li><a target="_blank" rel="noopener" href="http://rogerdudler.github.io/git-guide/index.zh.html">git 简明指南</a></li>
<li><a target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/p/22609000">我的git笔记</a></li>
</ol>

            </div>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                  <div class="post-meta mr-3">
                    <i class="iconfont icon-category"></i>
                    
                      <a class="hover-with-bg" href="/categories/Git/">Git</a>
                    
                  </div>
                
                
                  <div class="post-meta">
                    <i class="iconfont icon-tags"></i>
                    
                      <a class="hover-with-bg" href="/tags/Git/">Git</a>
                    
                  </div>
                
              </div>
              
                <p class="note note-warning">本博客所有文章除特别声明外，均采用 <a target="_blank" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！</p>
              
              
                <div class="post-prevnext row">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2020/10/07/css%E7%9B%92%E6%A8%A1%E5%9E%8B/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">css盒模型</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2020/10/04/markdown/">
                        <span class="hidden-mobile">Markdown</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div id="tocbot"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    
  </main>

  
    <a id="scroll-top-button" href="#" role="button">
      <i class="iconfont icon-arrowup" aria-hidden="true"></i>
    </a>
  

  
    <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
  

  

  

  <footer class="mt-5">
  <div class="text-center py-3">
    <div>
      <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a>
      <i class="iconfont icon-love"></i>
      <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener">
        <span>Fluid</span></a>
    </div>
    

    

    
  </div>
</footer>

<!-- SCRIPTS -->
<script  src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js" ></script>
<script  src="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/js/bootstrap.min.js" ></script>
<script  src="/js/debouncer.js" ></script>
<script  src="/js/main.js" ></script>

<!-- Plugins -->


  
    <script  src="/js/lazyload.js" ></script>
  



  



  <script defer src="https://cdn.staticfile.org/clipboard.js/2.0.6/clipboard.min.js" ></script>
  <script  src="/js/clipboard-use.js" ></script>







  <script  src="https://cdn.staticfile.org/tocbot/4.11.1/tocbot.min.js" ></script>
  <script>
    $(document).ready(function () {
      var boardCtn = $('#board-ctn');
      var boardTop = boardCtn.offset().top;

      tocbot.init({
        tocSelector: '#tocbot',
        contentSelector: '#post-body',
        headingSelector: 'h1,h2,h3,h4,h5,h6',
        linkClass: 'tocbot-link',
        activeLinkClass: 'tocbot-active-link',
        listClass: 'tocbot-list',
        isCollapsedClass: 'tocbot-is-collapsed',
        collapsibleClass: 'tocbot-is-collapsible',
        collapseDepth: 0,
        scrollSmooth: true,
        headingsOffset: -boardTop
      });
      if ($('.toc-list-item').length > 0) {
        $('#toc').css('visibility', 'visible');
      }
    });
  </script>



  <script  src="https://cdn.staticfile.org/typed.js/2.0.11/typed.min.js" ></script>
  <script>
    var typed = new Typed('#subtitle', {
      strings: [
        '  ',
        "Git&nbsp;",
      ],
      cursorChar: "_",
      typeSpeed: 70,
      loop: false,
    });
    typed.stop();
    $(document).ready(function () {
      $(".typed-cursor").addClass("h2");
      typed.start();
    });
  </script>



  <script  src="https://cdn.staticfile.org/anchor-js/4.2.2/anchor.min.js" ></script>
  <script>
    anchors.options = {
      placement: "right",
      visible: "hover",
      
    };
    var el = "h1,h2,h3,h4,h5,h6".split(",");
    var res = [];
    for (item of el) {
      res.push(".markdown-body > " + item)
    }
    anchors.add(res.join(", "))
  </script>



  <script  src="/js/local-search.js" ></script>
  <script>
    var path = "/local-search.xml";
    var inputArea = document.querySelector("#local-search-input");
    inputArea.onclick = function () {
      searchFunc(path, 'local-search-input', 'local-search-result');
      this.onclick = null
    }
  </script>



  <script  src="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.css" />

  <script>
    $('#post img:not(.no-zoom img, img[no-zoom]), img[zoom]').each(
      function () {
        var element = document.createElement('a');
        $(element).attr('data-fancybox', 'images');
        $(element).attr('href', $(this).attr('src'));
        $(this).wrap(element);
      }
    );
  </script>




















</body>
</html>
